#include <iostream>
#include <fstream>
using namespace std;

const int MAX = 50;
int num[MAX];  //输入的数
int visit[MAX];  //是否已经用过
int rop[MAX];  //1--'+', 2--'-', 3--'*', 4--'/'
int n, m;
int p[MAX];  //临时数组
int bestp[MAX];  //最优数组
int bestop[MAX]; //最优操作符
char op[] = { ' ', '+', '-', '*', '/' };
int key;  //搜索深度逐渐加深

bool found()
{
    int result = p[0];
    for (int i = 0; i < key; i++)  //计算式子的结果
    {
        switch (rop[i])
        {
        case 1:
            result += p[i + 1];
            break;
        case 2:
            result -= p[i + 1];
            break;
        case 3:
            result *= p[i + 1];
            break;
        case 4:
            result /= p[i + 1];
            break;
        }
    }

    return result == m;
}

bool backtrack(int dep)
{
    if (dep > key)
    {
        if (found()) {
            //进行一个赋值操作
            copy(p, p + key + 1, bestp);
            copy(rop, rop + key + 1, bestop);
            return true;
        }
        else return false;
    }
    for (int i = 0; i < n; i++)
    {
        if (visit[i])
        {
            continue;
        }
        visit[i] = 1;
        p[dep] = num[i];
        for (int j = 1; j <= 4; j++)
        {
            rop[dep] = j;
            if (backtrack(dep + 1))
            {
                return true;
            }
            rop[dep] = 0;
        }
        visit[i] = 0;
        p[dep] = 0;
    }
    return false;
}

int main()
{
    scanf("%d%d", &n, &m);
    for (int i = 0; i < n; i++)
    {
        scanf("%d", &num[i]);
    }
    memset(visit, 0, sizeof(visit));
    memset(p, 0, sizeof(p));
    memset(bestop, 0, sizeof(bestop));
    for (key = 0; key < n; key++)
    {
        if (backtrack(0))
        {
            printf("%d\n",key);
            printf("%d",bestp[0]);
            for (int i = 0; i < key; i++)
            {
                printf("%c%d", op[bestop[i]], bestp[i + 1]);
   
            }
            return 0;
        }
    }
    printf("no solution");
    return 0;
}
